<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\ai\validate;

use think\Validate;

/**
 * 账变管理验证器
 */
class BalanceLogValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'type' => 'require',
        'price' => 'require',
        'before' => 'require',
        'after' => 'require',
        'remarks' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'type' => '账户类型必须填写',
        'price' => '变动金额必须填写',
        'before' => '变动前必须填写',
        'after' => '变动后必须填写',
        'remarks' => '变动说明必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'type',
            'price',
            'before',
            'after',
            'remarks',
        ],
        'update' => [
            'type',
            'price',
            'before',
            'after',
            'remarks',
        ],
    ];

}
